# -*- coding: utf-8 -*-
from django.conf.urls import url
from .views import HomeView, AuthorView, ItemView, DemoView
from django.views.decorators.cache import cache_page

urlpatterns = [
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^author/(?P<slug>[-\w@.]+)/$', AuthorView.as_view(), name='author'),
    url(r'^item/(?P<slug>[-\w@.]+)/$', cache_page(60 * 60)
        (ItemView.as_view()), name='item'),
    url(r'^demo/$', DemoView.as_view(), name='demo'),
]
